
<%@ page import="auctionhaus.Bid"%>

<!-- 
	/**
	 * UI-1: The listing detail page will asynchronously load and display a list of the last 10 bids placed on the item showing the user, date/time, and amount. 
	 * The implementation of the lookup of these results must be done with a Named Query. (Integration Test)
	 */
 -->

<table>
	<thead>
		<tr>
			<th><g:message code="bid.bidder.label" default="Bidder" /></th>

			<g:sortableColumn property="amount"
				title="${message(code: 'bid.amount.label', default: 'Amount')}" />



			<g:sortableColumn property="dateCreated"
				title="${message(code: 'bid.dateCreated.label', default: 'Date Created')}" />



		</tr>
	</thead>
	<tbody>
		<g:each in="${bidInstanceList}" status="i" var="bidInstance">
			<tr class="${(i % 2) == 0 ? 'even' : 'odd'}">

				<td><g:link action="show" id="${bidInstance.id}">
						${fieldValue(bean: bidInstance, field: "bidder")}
					</g:link></td>

				<td>${Bid.amountFormatter(Float.parseFloat(fieldValue(bean: bidInstance, field: "amount").toString().replace(',', '')))}</td>


				<td><g:formatDate date="${bidInstance.dateCreated}" /></td>



			</tr>
		</g:each>
	</tbody>
</table>

